<!--
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author FIRE
-->
<template>
  <PageWrapper>
    <div class="box">
        <div style="width: 50%;">
          <div style="text-align: center;font-weight: bold;font-size: 20px;">
            历史附件处理
          </div>
          <div style="margin: 20px 10px;padding: 20px;border: 1px solid #c6c0c0;border-radius: 10px;">
            <div style="font-weight: bold;">
              1.数据库文件转本地文件
            </div>
            <div style="text-align: right;">
              <a-button type="primary" @click="handlestep('step1')" >
                <Icon icon="ant-design:check-circle-outlined" /> {{ t('执行') }}
              </a-button>
            </div>
          </div>

          <div style="margin: 20px 10px;padding: 20px;border: 1px solid #c6c0c0;border-radius: 10px;">
            <div style="font-weight: bold;">
              2.本地文件上传
            </div>
            <div style="text-align: right;">
              <a-button type="primary" @click="handlestep('step2')" >
                <Icon icon="ant-design:check-circle-outlined" /> {{ t('执行') }}
              </a-button>
            </div>
          </div>

          <div style="margin: 20px 10px;padding: 20px;border: 1px solid #c6c0c0;border-radius: 10px;">
            <div style="font-weight: bold;">
              3.本地文件关联实体业务
            </div>
            <div style="text-align: right;">
              <a-button type="primary" @click="handlestep('step3')" >
                <Icon icon="ant-design:check-circle-outlined" /> {{ t('执行') }}
              </a-button>
            </div>
          </div>

          <div style="margin: 20px 10px;padding: 20px;border: 1px solid #c6c0c0;border-radius: 10px;">
            <div style="font-weight: bold;">
              4.技术 安全 竣工 文件处理
            </div>
            <div style="text-align: right;">
              <a-button type="primary" @click="handlestep('step4')" >
                <Icon icon="ant-design:check-circle-outlined" /> {{ t('执行') }}
              </a-button>
            </div>
          </div>
        </div>
    </div>

  </PageWrapper>
</template>
<script lang="ts">
  export default defineComponent({
    name: 'ViewsHistoryHistoryFileIndex',
  });
</script>
<script lang="ts" setup>
  import { defineComponent, onMounted } from 'vue';
  import { PageWrapper } from '/@/components/Page';
  import { useI18n } from '/@/hooks/web/useI18n';
  import { useMessage } from '/@/hooks/web/useMessage';
  import { router } from '/@/router';
  import { Icon } from '/@/components/Icon';
  import { hisDataExecExcute } from '/@/api/hisDataExec/historyFile';
  import { useUserStore } from '/@/store/modules/user';
  const userStore = useUserStore();

  const { t } = useI18n('history.historyFile');
  const { showMessage } = useMessage();
  const getTitle = {
    icon: router.currentRoute.value.meta.icon || 'ant-design:book-outlined',
    value: router.currentRoute.value.meta.title || t('付款申请管理'),
  };

  const props = defineProps({
    payType: { type: String, default: '' },
  });

  async function handlestep(step) {
    const res = await hisDataExecExcute({step});
    showMessage(res.message);
  }

</script>
<style scoped>
  .box {
   min-height: calc(100vh - 150px);
  }
</style>